		
<?
 $sess = new Zend_Session_Namespace(CLU_NS);

 if (!strpos($sess->userPermissions, "administer everything"))
 return;
?>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/ui-lightness/jquery-ui.css" type="text/css" media="all" />
<style>
#admin-menu-accordion li
{
	font-weight:bold;
	width: 100%;
	height: 20px;
}
#admin-menu-accordion li a
{
	color: #1C94C4;
}
li.menu-focused
{
	background-color:#fdf6d2;
}
li.menu-focused a
{
	color: #EB8F00; 
}
</style>	
<script type="text/javascript">
	$(function() {
		$("#admin-menu-accordion").accordion();
		request = '<?=$sess->masterRequest ?>';
		tmp = request.split("/");
		module = tmp[0];
		controller = tmp[1];
		action = tmp[2];

		$("#admin-menu-accordion a[name=" + module + "]").trigger('click');
		<?if (isset( $_REQUEST['type'] )) :?>		
		if (module === "node")
		{
			type = '<?=$_REQUEST['type'] ?>';
			request = module + '/' + type + '/' + action;
		}
		<?endif ?>
		$("#admin-menu-accordion li[name=" + request + "]").addClass('menu-focused');
	});
</script>
	
<div class="demo box white_bg">
<span style="font-weight:bold; font-size:18px"> Administration Menu </span>
<br/>
<div id="admin-menu-accordion">
	<h3><a href="#" name="user">User</a></h3>
		<div>
			<ul id="user-menu">
				<li name="user/role/new"><a 
				href="<?=$this->hvnUrl(
							array("action" => "new",
								  "module" => "user",
								  "controller" => "role", 
									), 'generic')?>" 
									> New roles
					</a>
				</li>
				<li name="user/role/list"><a 
				href="<?=$this->hvnUrl(
							array("action" => "list",
								  "module" => "user",
								  "controller" => "role", 
									), 'generic')?>" 
									> List roles
					</a>
				</li>
			</ul>
				
		</div>
	<h3><a href="#" name="category">Category</a></h3>
		<div>
			<ul>
				<li name="category/master/new"><a 
				href="<?=$this->hvnUrl(
							array("action" => "new",
								  "module" => "category"
							  	  ), "nocontroller")?>" 
									> New category
					</a>
				</li>
				
				<li name="category/master/search"><a 
				href="<?=$this->hvnUrl(
							array("action" => "search",
								  "module" => "category",
									), "nocontroller")?>" 
									> Search category
					</a>
				</li>
				
				<li name="category/master/search"><a 
				href="<?=$this->hvnUrl(
							array("action" => "moderate-category",
								  "module" => "category",
									), "nocontroller")?>" 
									> Moderate category tables
					</a>
				</li>
				
			</ul>
		</div>
	<h3><a href="#" name="node">Node</a></h3>
		<div>
			<ul>
				<li name="node/master/list-node-types"><a 
				href="<?=$this->hvnUrl(
							array("action" => "list-node-types", 
								  "module" => "node",
								  ), "nocontroller")?>" 
									>List node types
					</a>
				</li>
			
				<li name="node/news/new"><a 
				href="<?=$this->hvnUrl(
							array("action" => "new-node-type",
								  "module" => "node"),
								  "nocontroller")?>" 
									>New Node Type
					</a>
				</li>
				
				<li name="node/blast/search"><a 
				href="<?=$this->hvnUrl(
							array("action" => "search", 
								  "module" => "node",
								  "type" => "blast"), "nocontroller")?>?type=blast" 
									>Search Blast
					</a>
				</li>
				
				<li name="node/blog/search"><a 
				href="<?=$this->hvnUrl(
							array("action" => "search", 
								  "module" => "node",
								  "type" => "blog"), "nocontroller")?>?type=blog" 
									>Search Blog
					</a>
				</li>
				
				<li name="node/news/search"><a 
				href="<?=$this->hvnUrl(
							array("action" => "search", 
								  "module" => "node",
								  "type" => "news"), "nocontroller")?>?type=news" 
									>Search News
					</a>
				</li>
				
				<li name="node/pm/search"><a 
				href="<?=$this->hvnUrl(
							array("action" => "search", 
								  "module" => "node",
								  "type" => "pm"), "nocontroller")?>?type=pm" 
									>Search Pm
					</a>
				</li>
				
				<li name="node/promotion/search"><a 
				href="<?=$this->hvnUrl(
							array("action" => "search", 
								  "module" => "node",
								  "type" => "promotion"), "nocontroller")?>?type=promotion" 
									>Search Promotion
					</a>
				</li>

				<li name="node/gallery/search"><a 
				href="<?=$this->hvnUrl(
							array("action" => "search", 
								  "module" => "node",
								  "type" => "gallery"), "nocontroller")?>?type=gallery" 
									>Search Gallery
					</a>
				</li>
				

			</ul>
			
		</div>
		
			<h3><a href="#" name="admin">Admin widgets</a></h3>
		<div>
			<ul>
				<li name="admin/master/manage-featured-content"><a 
				href="<?=$this->hvnUrl(
							array("action" => "manage-featured-content", 
								  "module" => "admin",
								  ), "nocontroller")?>" 
									>Add/remove items to widgets
					</a>
				</li>

				<li name="admin/master/order-widget-items-weights"><a 
				href="<?=$this->hvnUrl(
							array("action" => "order-widget-items-weights", 
								  "module" => "admin",
								  ), "nocontroller")?>" 
									> Order the items
					</a>
				</li>

			</ul>
			
		</div>
		
					<h3><a href="#" name="admin">Cron Jobs</a></h3>
		<div>
			<ul>
				<li name="admin/master/manage-featured-content"><a 
				href="<?=$this->hvnUrl(
							array("action" => "update-city-district-counters",
								  "controller" => "cron", 
								  "module" => "admin",
								  ), "generic")?>" 
									>Update city/district counters
					</a>
				</li>

				<li name="admin/master/order-widget-items-weights"><a 
				href="<?=$this->hvnUrl(
							array("action" => "update-categories-counters", 
								  "controller" => "cron", 
								  "module" => "admin",
								  ), "generic")?>" 
									>Update Categories counters
					</a>
				</li>

				<li name="admin/master/order-widget-items-weights"><a 
				href="<?=$this->hvnUrl(
							array("action" => "update-user-counters", 
								  "controller" => "cron", 
								  "module" => "admin",
								  ), "generic")?>" 
									>Update User counters
					</a>
				</li>
				
				<li name="admin/cron/update-comments"><a 
				href="<?=$this->hvnUrl(
							array("action" => "update-comments", 
								  "controller" => "cron", 
								  "module" => "admin",
								  ), "generic")?>" 
									>Update comments counter
					</a>
				</li>


			</ul>
			
		</div>
</div><!-- End accordion -->

</div><!-- End demo -->
